﻿<?php
/*
 * Template Name:淘宝热卖
 * 
 */
get_header(); ?>

<div class="page_width">
	<div class="pagebox">
		<div class="navigate_path"><?php if (function_exists('wp_bac_breadcrumb')) {wp_bac_breadcrumb();}?></div>
	</div>
	
	<div class="masonry_list">
		<?php 
		$catid = 1;
		$nopicurl = get_bloginfo('template_url')."/images/no-pic.png";
		query_posts("cat=".$catid."&paged=".$paged);
		if( have_posts() ){ while( have_posts() ) : the_post(); ?>
		<div class="item">
			<div class="list_item">
				<div class="pic">
					<a style="width:200px;" href="<?php the_permalink() ?>" target="_blank">
					<?php
	                  $picurl = get_post_img();
	                  if($picurl == "")
	                  	$picurl = $nopicurl;
	                  echo '<img src="'.$picurl.'" alt="'.$post->post_title.'" width="200" />'
					?>
					</a>
					<?php $price = get_post_meta($post->ID, "good_price", true);
					if(empty($price)){}else{?>
					<p>￥<?php echo $price; ?></p>
					<?php }?>
				</div>
				<div class="tags">
					<?php the_tags('标签：'); ?>
				</div>
				<div class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
			</div>
		</div>
		<?php endwhile; }else{echo '<div style="padding:20px;color:#777;">本分类暂无内容!</div>';}?>
	</div>
</div>

<?php get_footer(); ?>